package controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import service.model.Student;

@Controller
@RequestMapping("/student")
public class StudentController {
	
	@RequestMapping("/hello")
	public String renderHello(HttpServletRequest request){
		Student student=new Student();
		student.setName("nsl");
		request.setAttribute("student", student);
		return "hello";
	}

	@RequestMapping("/passList")
	public String renderHelloWithList(@RequestBody String student,HttpServletRequest request){
		System.out.println(student);
		return "hello";
	}
	
}
